﻿<form id="newtaskform" data-bind="submit: save.execute" class="form-horizontal">
<fieldset>
    <legend data-bind="text: title"></legend>
     <!-- ko with: item -->
    <div class="control-group">
        <label for="ProjectId" class="control-label">Project</label>
        <div class="controls">
            <input type="text" class="input-xlarge" style="width: 280px;" value="13" id="ProjectId" name="ProjectId" data-bind="value: ProjectId, select2: $parent.projects" />
            <span class="error" data-bind="validationPopover: ProjectId"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="Summary" class="control-label">Summary</label>
        <div class="controls">
            <input data-bind="value: Summary" id="Summary" class="input-xlarge focused span6" maxlength="500" autofocus=""autocomplete="off" type="text" name="Summary" />
            <span class="error" data-bind="validationPopover: Summary"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="Description" class="control-label">@Loc.Description</label>
        <div class="controls">
            <textarea id="Description" rows="5" name="Description" data-bind="value: Description"></textarea>
        </div>
    </div>
    <div class="control-group">
        <label for="DueDate" class="control-label">DueDate</label>
        <div class="controls">
            <input type="text" class="input-xlarge" id="DueDate" name="DueDate" data-bind="value: DueDate, datepicker: {}" />
            <span class="error" data-bind="validationPopover: DueDate"></span>
        </div>
    </div>
    <input type="hidden" data-bind="value: Id" name="Id"/>
        <!-- /ko -->
    <div class="form-actions">
        <button class="btn btn-primary" data-bind="command: save, activity: save.isExecuting" type="submit">@Loc.Save</button>
        <a class="btn" href="#view=tasklist">@Loc.Cancel</a>
    </div>
</fieldset>
</form>